#ifndef __H_MY_DEF_H__
#define __H_MY_DEF_H__

//#include "globalDefine.h"

struct stPlayer
{
	unsigned int m_agentId;
	unsigned short m_gameSrvType;
	unsigned int m_gameSrvId;
	unsigned int m_tableId;
	string m_access;
	unsigned int m_accessId;
	string m_game;
	unsigned int m_gameId;
	unsigned int m_level;
	int m_aiFlag;
	stPlayer()
	{
		m_agentId = 0;
		m_gameSrvType = 0;
		m_gameSrvId = 0;
		m_tableId = 0;
		m_accessId = 0;
		m_gameId = 0;
		m_level = 0;
		m_aiFlag = 0;
	}
	stPlayer(const unsigned int agentId, const unsigned short gameSrvType, const unsigned int gameSrvId, const unsigned int tableId, const string& access
		, const unsigned int accessId, const string& game, const unsigned int gameId, const unsigned int level, const int aiFlag)
	{
		m_agentId = agentId;
		m_gameSrvType = gameSrvType;
		m_gameSrvId = gameSrvId;
		m_tableId = tableId;
		m_access = access;
		m_accessId = accessId;
		m_game = game;
		m_gameId = gameId;
		m_level = level;
		m_aiFlag = aiFlag;
	}

	stPlayer(const stPlayer& other)
	{
		m_agentId = other.m_agentId;
		m_gameSrvType = other.m_gameSrvType;
		m_gameSrvId = other.m_gameSrvId;
		m_tableId = other.m_tableId;
		m_access = other.m_access;
		m_accessId = other.m_accessId;
		m_game = other.m_game;
		m_gameId = other.m_gameId;
		m_level = other.m_level;
		m_aiFlag = other.m_aiFlag;
	}

	stPlayer(const stPlayer&& other):m_access(std::move(other.m_access)), m_game(std::move(other.m_game))
	{
		m_agentId = other.m_agentId;
		m_gameSrvType = other.m_gameSrvType;
		m_gameSrvId = other.m_gameSrvId;
		m_tableId = other.m_tableId;
		//m_access = other.m_access;
		m_accessId = other.m_accessId;
		//m_game = other.m_game;
		m_gameId = other.m_gameId;
		m_level = other.m_level;
		m_aiFlag = other.m_aiFlag;
	}

	stPlayer& operator = (const stPlayer& other)
	{
		if (this == &other)
			return *this;

		m_agentId = other.m_agentId;
		m_gameSrvType = other.m_gameSrvType;
		m_gameSrvId = other.m_gameSrvId;
		m_tableId = other.m_tableId;
		m_access = other.m_access;
		m_accessId = other.m_accessId;
		m_game = other.m_game;
		m_gameId = other.m_gameId;
		m_level = other.m_level;
		m_aiFlag = other.m_aiFlag;

		return *this;
	}

	stPlayer& operator = (stPlayer&& other)
	{
		if (this == &other)
			return *this;

		m_agentId = other.m_agentId;
		m_gameSrvType = other.m_gameSrvType;
		m_gameSrvId = other.m_gameSrvId;
		m_tableId = other.m_tableId;
		m_access = std::move(other.m_access);
		m_accessId = other.m_accessId;
		m_game = std::move(other.m_game);
		m_gameId = other.m_gameId;
		m_level = other.m_level;
		m_aiFlag = other.m_aiFlag;

		return *this;
	}
};

const unsigned int g_offline_cache_dur = 300;
const unsigned int g_offline_cache_timer_interval = 60;
enum ONLINE_TIMER
{
	TIMERID_OFFLINE_CACHE_CHECK = 1

};

#endif